unit GrupoSearchFr;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
  ExtCtrls, Buttons, StdCtrls, MainSearchFr;

type

  { TGrupoSearchFrame }

  TGrupoSearchFrame = class(TMainSearchFrame)
    id_grupo: TEdit;
    desc_grupo: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    procedure LocalizarButtonClick(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

implementation

uses GrupoDM,QueryConditions;

{ TGrupoSearchFrame }

procedure TGrupoSearchFrame.LocalizarButtonClick(Sender: TObject);
  var
  condicoes: TQueryConditions;
begin
  condicoes := TQueryConditions.Create(CON_AND);
  condicoes.Add('id_grupo', id_grupo.Text);
  condicoes.AddText('desc_grupo', desc_grupo.Text);
  GrupoData.Search(Condicoes, 'grupo');
end;

initialization
  {$I gruposearchfr.lrs}

end.

